import request from '@/utils/request'

// 设备类型统计图表
export const EquipmentType = () => {
  return request({
    url: '/opermgt/device/overview/equipment',
    method: 'POST',
  })
}

// 故障率
export const EquipmentFailurerate = () => {
  return request({
    url: '/opermgt/device/overview/failurerate',
    method: 'POST',
  })
}

// 故障率单位信息
export const EquipmentGetUnitInfo = () => {
  return request({
    url: '/opermgt/device/overview/getUnitInfo',
    method: 'POST',
  })
}

// 设备厂家统计
export const Equipmentmanufacturer = () => {
  return request({
    url: '/opermgt/device/overview/manufacturer',
    method: 'POST',
  })
}
//资产设备表
export const assemanagementList = (params, page, size) => {
  return request({
    url: `/opermgt/assemanagement/search/${page}/${size}`,
    method: 'POST',
    data: params
  })
}

//资产设备表
export const stateCode = (params) => {
  return request({
    url: '/opermgt/dict/queryByType',
    method: 'POST',
    data: params
  })
}

//出库记录表条件分页查询
export const RecordList = (params, page, size) => {
  return request({
    url: `/opermgt/deliveryRecord/search/${page}/${size}`,
    method: 'POST',
    data: params
  })
}

//出库记录新增
export const AddRecord = (params) => {
  return request({
    url: '/opermgt/deliveryRecord',
    method: 'POST',
    data: params
  })
}

//库存记录表条件分页查询
export const OutRecordList = (params, page, size) => {
  return request({
    url: `/opermgt/InventoryRecords/search/${page}/${size}`,
    method: 'POST',
    data: params
  })
}

//库存记录表保存
export const AddInventoryRecords = (params) => {
  return request({
    url: '/opermgt/InventoryRecords',
    method: 'POST',
    data: params
  })
}
